{% load staticfiles %}
{% include "header.html" %}
<div class="container user-box">
    <div class="user-info">
        {% if user_all.icon %}
            <img class="user-info-icon" src="/media/{{ user_all.icon }}">
        {% else %}
            <img class="user-info-icon" src="/static/images/icon.jpg">
        {% endif %}
        {% if user == user_all %}

            <a href="/logout">
                <img class="user-info-edit" src="{% static "images/logout.png" %}">
            </a>
            <a href="/edit">
                <img class="user-info-edit" src="{% static "images/edit.png" %}">
            </a>
        {% endif %}
        <div class="user-name-box">
            <a class="user-info-name">{{ user_all.name }}</a>
            <a class="user-info-text">{{ user_all.text }} </a>
            {% if user != user_all %}
                <div onclick="followClick({{ user_all.id }},'user-follow-')" class="user-info-follow">
                    <a id="user-follow-{{ user_all.id }}" class="{% if user_all.following %} following {% endif %}">
                        {% if user_all.following %}取消{% endif %}关注</a>
                </div>
            {% endif %}
        </div>
        {% if user == user_all %}
            <a href="/publish" class=" edit-submit user-publish-btn" style="display: block">发布</a>
        {% endif %}

        <div style="clear: both"></div>
    </div>
    <div class="user-menu-box">
        <div class="user-menu">
            <a href="/user/{{ user_all.username }}" class="menu-number">{{ user_all.get_posts_count }}</a>
            <a href="/user/{{ user_all.username }}" class="menu-name">发布</a>
        </div>
        <div class="user-menu">
            <a href="/user/{{ user_all.username }}/collects" class="menu-number">{{ user_all.get_collects_count }}</a>
            <a href="/user/{{ user_all.username }}/collects" class="menu-name">收藏</a>
        </div>
        <div class="user-menu">
            <a href="/user/{{ user_all.username }}/likes" class="menu-number">{{ user_all.get_likes_count }}</a>
            <a href="/user/{{ user_all.username }}/likes" class="menu-name">点赞</a>
        </div>
        <div class="user-menu">
            <a href="/user/{{ user_all.username }}/follows" class="menu-number">{{ user_all.get_follows_count }}</a>
            <a href="/user/{{ user_all.username }}/follows" class="menu-name">关注</a>
        </div>
        <div class="user-menu">
            <a href="/user/{{ user_all.username }}/fans" class="menu-number">{{ user_all.get_fans_count }}</a>
            <a href="/user/{{ user_all.username }}/fans" class="menu-name">粉丝</a>
        </div>
    </div>